1. Technical Field
This disclosure generally relates to deploying virtual machines to host computer systems, and more specifically relates to selecting a host for a virtual machine using a hardware multithreading parameter.
2. Background Art
In a cloud environment, a cloud manager deploys virtual machines to host computer systems to create virtual servers. Typically the cloud manager receives a request that specifies what the virtual machine image requires for system resources, such as memory, disk and CPU. The cloud manager then determines available host computer systems that have the required system resources, selects one of the available host computers systems, and deploys the virtual machine to the selected host computer system.
OpenStack is open-source software for building private and public clouds. In OpenStack, virtual hardware templates called “flavors” specify system resources needed for virtual machines. For example, a flavor in OpenStack can specify size of memory, root disk size, and number of virtual CPUs for a virtual machine. When a virtual machine needs to be deployed, a call is made to the cloud manager with the flavor specifying the needed resources for the virtual machine. The cloud manager then finds one or more host computer systems that have the resources specified in the flavor, and deploys the virtual machine on one of the host computer systems that satisfies the flavor.
Hardware multithreading in a host can complicate the provisioning of virtual machines to a host computer system. In the prior art, if hyperthreading is enabled on the host computer system, the number of hardware threads are considered when selecting a host computer system for a virtual machine and virtual CPUs are allocated to hardware threads without regard to the physical cores. If hyperthreading is not enabled on the host computer system, only physical processor cores are considered when selecting a host computer system for a virtual machine, and virtual CPUs are allocated only to physical processor cores when a VM is provisioned on the selected host computer system. With modern processor architectures such as POWER that include many hardware threads in each core, the result is a very inefficient use of processing resources.